﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;

namespace Projektet.View
{
    class CustomSystem
    {
        private Vector2 _startingPosition;

        private int _numberOfSplitter = 15;

        SplitterParticle[] _splitterArray;

        public CustomSystem(Vector2 startingPosition, Texture2D splitterTexture)
        {            
            _startingPosition = new Vector2(startingPosition.X, startingPosition.Y - 20f);
            //_startingPosition = startingPosition;
            
            _splitterArray = new SplitterParticle[_numberOfSplitter];

            for (int i = 0; i < _numberOfSplitter; i++)
            {
                SplitterParticle splitter = new SplitterParticle(_startingPosition, i, splitterTexture);
                _splitterArray[i] = splitter;
            }
        }

        internal void Draw(SpriteBatch spritebatch)
        {
            foreach (SplitterParticle splitter in _splitterArray)
            {
                splitter.Draw(spritebatch);
            }
        }        
    }
}
